@extends('layout.main')
@section('content')
    <div class="col-sm-8">
        <blockquote>
            <p><img src="/web/image/user.jpeg" alt="" class="img-rounded" style="border-radius:500px; height: 40px">
            </p>
            {{$user->name}}
            <footer>关注：{{$user->stars_count}}｜粉丝：{{$user->fans_count}}｜文章：{{$user->posts_count}}</footer>
            @include('user.badges.like',['target_user'=>$user])
        </blockquote>
    </div>
    <div class="col-sm-8 blog-main">
        <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#tab_1" data-toggle="tab" aria-expanded="true">文章</a></li>
                <li class=""><a href="#tab_2" data-toggle="tab" aria-expanded="false">关注</a></li>
                <li class=""><a href="#tab_3" data-toggle="tab" aria-expanded="false">粉丝</a></li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane active" id="tab_1">
                    @foreach($posts as $post)
                        <div class="blog-post" style="margin-top: 30px">
                            <p class=""><a href="/user/{{$post->user->id}}">{{$post->user->name}}</a>{{$post->created_at->diffForHumans()}}</p>
                            <p class=""><a href="/posts/{{$post->id}}">{{str_limit($post->title,'10','...')}}</a></p>
                        </div>
                    @endforeach
                </div>
                <!-- 关注 -->
                <div class="tab-pane" id="tab_2">
                    @foreach($susers as $user)
                        <div class="blog-post" style="margin-top: 30px">
                            <p class="">{{$user->name}}</p>
                            <p class="">关注：{{$user->stars_count}} | 粉丝：{{$user->fans_count}}｜
                                文章：{{$user->posts_count}}</p>
                            @include('user.badges.like', ['target_user' => $user])

                        </div>
                    @endforeach
                </div>
                <!-- 粉丝 -->
                <div class="tab-pane" id="tab_3">
                    @foreach($fusers as $user)
                        <div class="blog-post" style="margin-top: 30px">
                            <p class="">{{$user->name}}</p>
                            <p class="">关注：{{$user->stars_count}} | 粉丝：{{$user->fans_count}}｜
                                文章：{{$user->posts_count}}</p>
                            @include('user.badges.like', ['target_user' => $user])
                        </div>
                    @endforeach
                </div>
            </div>
        </div>
    </div><!-- /.blog-main -->
@endsection


